<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑商品</title>
<script language="javascript">
function addattribute(goods_id)
{
	$("#goods_id").val(goods_id);
	$('#addattributeform').modal('show');	
}
$(document).ready(function(){
	getsecondcate('{{$goods.g_secondclassid}}');
	getthirdcate('{{$goods.g_secondclassid}}','{{$goods.g_threeclassid}}');
});
function showinputPro()
{
	var inputn = document.getElementById("showsuppliertd");
	var str=inputn.innerHTML;
	var num=1;
	var tonum = 1;
	for(var i=1;i<=num;i++){
		tonum=tonum+i;
		str += "<tr id=las"+tonum+">";
		str+="<td class=\"head1\">采购商家名称</td>";
		str+="<td class=\"head0\"><input id=\"businessman\" name=\"businessman[]\" class=\"width200\" type=\"text\"></td>";
        str+="<td class=\"head1\">采购连接</td>";
		str+="<td class=\"head0\"><input id=\"businessmanline\" name=\"businessmanline[]\" class=\"width400\" type=\"text\"></td>";
		 str+="<td>&nbsp;&nbsp;<a href=javascript:void(0) onclick=delfileinput("+tonum+")><span style=\"padding:5px 0 0\" class=\"c9\">移除</span></a></td>";
        str+="</tr>";
	}
	$("#showsuppliertd").before(str);
	
}
function checkcognatelist(goods_id)
{
	var cognatelist = $("#cognatelist").val();
	$.post("/product/ajaxbutton", {"op": "checkcognatelist","goods_id":goods_id,"cognatelist":cognatelist},
	  function(data){
			if(data)
			{
				alert(data);
			}
			
	   },"text");	
}
</script>
<body class="withvernav">
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">编辑商品</h1>
      <span class="pagedesc"></span>
      <div class="menulist">
        <ul class="profile_summary">
        </ul>
      </div>
    </div>
    <!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper">
      <div id="basicform" class="subcontent">
        <form class="stdform stdform2"  id="otherForm" method="post" action="/product/saveeditproduct">
        <input type="hidden" name="goods_id" value="{{$goods.goods_id}}">
        <input type="hidden" name="parentID" value="{{$goods.goods_parentID}}">
      
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
              <tr>
                <th class="head1">商品图片 <a href="javascript:void(0)" onClick="addattribute({{$goods.goods_id}})" class="btn btn_orange btn_flag"><span>上传图片</span></a></th>
                
              </tr>
            </thead>
          </table>
           <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
              <thead>
              <tr>
			{{foreach from=$goods_images item=res name=loop key=key}}
              
                <td class="head1" style="position:relative;">
                {{if $res.local_url}}
                    <a href="/{{$res.local_url}}" target="_blank"><img src="/{{$res.local_url}}" width="200"></a>
                 {{else}}
                    <a href="{{$res.images_url}}" target="_blank"><img src="{{$res.images_url}}" width="200"></a>
                 {{/if}}
                <div class="delnocss"><a href="#" title="删除图片"><img src="/fuman/images/no.gif" onClick="delone({{$res.id}},'goodsImages')"></a></div>
                {{if $smarty.foreach.loop.iteration mod 6 ==0}}</tr><tr>{{/if}}</td>
              
              {{/foreach}}
              </tr>
             </thead>
          </table>
             <br>
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
              <tr>
                <th colspan="2" class="head1">基本信息</th>
              </tr>
            </thead>
          </table>
        <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <tbody>
              <tr>
                <td class="head1" width="120">商品分类 *</td>
                <td colspan="3" class="head0">
               
               	 <select name="bigclassID" id="bigclassID" class="selection" style="width:200px;" onChange="getsecondcate()" required>
                    <option value="">请选择</option>
                    {{foreach from=$categorylist item=res key=key}}
                    <option value="{{$res.id}}" {{if $goods.g_bigclassid == $res.id}} selected{{/if}}>{{$res.cate_name}}</option>
                    {{/foreach}}
                  </select>
                 
                &nbsp; <span id="showsecondcate"></span> &nbsp; <span id="showthirdcate"></span>
               
                </td>
              </tr>
               <tr>
                <td class="head1">商品SKU *</td>
                <td colspan="3" class="head0">
               
                <input type="text" name="sku" id="sku" class="width200" value="{{$goods.goods_sku}}" onKeyUp="this.value=this.value.replace(/[^\w_\w-]/g,'');" {{if $goods.goods_sku==""}}style="text-transform:uppercase;" {{/if}}  required {{if $classid ==12 || $classid ==13}}readonly{{/if}}>
                 <span id="skuerr"></span>
                
                 </td>
              </tr>
               <tr>
                <td class="head1">商品名称</td>
                <td colspan="3" class="head0">
                
              		  <input type="text" name="goods_name" class="width400" value="{{$goods.goods_name}}" required {{if $classid ==12 || $classid ==13}}readonly{{/if}}>
                 	
                	</td>
              </tr>
              <tr>
                <td class="head1">英文名称</td>
                <td colspan="3" class="head0">
              
                <input type="text" name="en_goods_name" class="width400" value="{{$goods.en_goods_name}}" {{if $classid ==12 || $classid ==13}}readonly{{/if}}>
                	
                </td>
              </tr>
               <tr>
                <td class="head1">子SKU</td>
                <td colspan="3" class="head0">
                
                <input type="text" name="cognatelist"  onBlur="checkcognatelist({{$goods.goods_id}})" id="cognatelist"  value="{{$goods.cognatelist}}" {{if $classid ==12 || $classid ==13}}readonly{{/if}}>
                
                </td>
              </tr>
               <tr>
                <td class="head1" width="8%">商品品牌</td>
                <td class="head0" width="45%"><input type="text" name="goods_brand" class="width100" value="{{$goods.goods_brand}}"></td>
                <td class="head0" width="8%">库存警戒天数</td>
                <td class="head1">
                
                <input type="text" name="inventory_day" class="width100" value="{{$goods.g_inventory_day}}" onKeyUp="this.value=this.value.replace(/[^0-9]/g,'');" {{if $classid ==12 || $classid ==13}}readonly{{/if}}>
                {{if $classid ==12 || $classid ==13}}
               	{{else}}
                {{if $goods.dailysales>0}}日均销量：{{$goods.dailysales}}
                <a href="javascript:void(0)"><img src="/fuman/images/icons/question.png"><span id="tip_info">
                ①网采新品前7天:依数学平均数，例如:前5天卖20个，则DMS=4<br>
                ①工厂新品前30天:依数学平均数，例如:前10天卖20个，则DMS=2<br>
                工厂30天，网采7天已满，按30和7天算销量</span></a>
                {{/if}}
                {{/if}}
                </td>
              </tr>
               <tr>
                <td class="head1">采购天数</td>
                <td class="head0">
               
               <input type="text" name="procurement" class="width100" value="{{$goods.g_procurement}}" {{if $classid ==12 || $classid ==13}}readonly{{/if}}>
                	
                </td>
                <td class="head0" width="120">零售价</td>
                <td class="head1"><input type="text" name="sellprice" class="width100" value="{{$goods.g_sellprice}}">（元）</td>
              </tr>
              <tr>
                <td class="head1">重量</td>
                <td class="head0"><input type="text" name="weight" class="width100" value="{{$goods.g_weight}}"></td>
                <td class="head0" width="120">出厂价(成本价)</td>
                <td class="head1"><input type="text" name="costprice" id="costprice" class="width100" value="{{$goods.g_costprice}}" required onBlur="changpricememo({{$goods.goods_id}},{{$goods.g_costprice}})">
                <span id="pricememo"></span>
                </td>
              </tr>
               <tr>
                <td class="head1">申报价值</td>
                <td class="head0"><input type="text" name="pd_declare_value" class="width100" value="{{$goods.g_pd_declare_value}}" ></td>
                <td class="head0" width="120">工时</td>
                <td class="head1">
                <input type="text" name="wages" class="width100" value="{{$goods.wages}}" >（元）
              </td>
              </tr>
               <tr>
                  <td class="head1">采购员</td>
                  <td class="head0"><select name="buyer" id="buyer" class="selection select2_group" style="width:200px;"  required>
                    <option value="">请选择</option>
                    
                      {{foreach from=$userlist item=res key=key}}
                    
                    <option value="{{$res.name}}" {{if $goods.g_buyer == $res.name}} selected{{/if}}>{{$res.name}}</option>
                    
                    {{/foreach}}
                  
                  </select></td>
                  <td class="head1">关联价</td>
                <td class="head0"><input type="text" name="bulkprice" id="bulkprice" class="width100" value="{{$goods.bulkprice}}" onBlur="changbulkpricememo({{$goods.goods_id}},{{$goods.bulkprice}})">
                <span id="bulkpricepricememo"></span>
                </td>
                </tr>
               <tr>
                <td class="head1">尺寸(CM) </td>
                <td class="head0" >长：
                  <input type="text" name="pd_length" class="width50" value="{{$goods.g_pd_length}}" >
                  宽：
                  <input type="text" name="pd_width" class="width50" value="{{$goods.g_pd_width}}">
                  高：
                  <input type="text" name="pd_height" class="width50" value="{{$goods.g_pd_height}}"></td>
                <td class="head1"><span class="head0">销售状态</span></td>
                <td class="head0" > 
                
                {{if $managers || in_array('258',$showpower)}}
                	
                    {{if $goods.g_sale_status==4}}
                    	停售
                        <input type="hidden" name="sale_status" value="{{$goods.g_sale_status}}"> 
                    {{elseif $goods.g_sale_status==5}}
                		清仓
                        <input type="hidden" name="sale_status" value="{{$goods.g_sale_status}}"> 
                	{{else}}
                       <select class="selectCss2" name="sale_status" id="sale_status">
                        <option value="">请选择</option>
                        {{foreach from=$salestatus item=res key=key}}
                        {{if  ($key==4 || $key==5 || $key==1)}}
                        {{else}}
                        	<option value="{{$key}}" {{if $goods.g_sale_status==$key}} selected="selected"{{/if}}> {{$res}} </option>
                        {{/if}}
                        
                        {{/foreach}}
                      </select>
                    {{/if}}
              
                 {{else}}
                      {{foreach from=$salestatus item=res key=key}}
                            {{if $goods.g_sale_status==$key}} <input type="hidden" name="sale_status" value="{{$key}}"> {{$res}}{{/if}}
                      {{/foreach}}
                  {{/if}}
                 
                 
                 
                  </td>
              </tr>
               <tr>
                 <td class="head1">供货商</td>
                 <td class="head0"><select name="supplier" id="supplier" class="selection" style="width:200px;" required>
                    <option value="">请选择</option>
                    {{foreach from=$factory item=res key=key}}
                    <option value="{{$res.id}}" {{if $res.id == $goods.g_supplier}} selected{{/if}}>{{$res.name}}</option>
                    {{/foreach}}
                  
                  </select></td>
                 <td class="head1">开发人员 </td>
                 <td class="head0"><select name="checkman" id="checkman" class="selection select2_group" style="width:200px;" required>
                    <option value="">请选择</option>
                    
                    {{foreach from=$userlist item=res key=key}}
                    
                    <option value="{{$res.name}}" {{if $goods.g_checkman == $res.name}} selected{{/if}}>{{$res.name}}</option>
                    
                    {{/foreach}}
                  
                  </select></td>
               </tr>
             
              {{if $goods.g_goodstypeID>0}}
                <tr>
                  <td class="head1">属性值</td>
                  <td class="head0" colspan="3">
                   <input type="hidden" name="goodstypeID" value="{{$goods.g_goodstypeID}}">
                  	  {{foreach from=$attributelist item=res key=key}}
                      		{{$res.attr_name}}	
       			 <select name="selectvaluelist{{$res.attr_id}}" id="selectvaluelist{{$res.attr_id}}" class="selection" style="width:200px;" >
                    <option value="">请选择</option>
                    {{foreach from=$res.selectvaluelist item=rd key=rkey}}
                    <option value="{{$rd}}" {{if $rd == $res.selectvalue}} selected{{/if}}>{{$rd}}</option>
                    {{/foreach}}
                  </select>
                      
                      
                      	
                      {{/foreach}}
                  </td>
                </tr>
               {{/if}}
               
                <tr>
                <td class="head1">质检标准</td>
                <td class="head0" colspan="3">
                    <link rel="stylesheet" href="/fuman/kindeditor/themes/default/default.css" />
	<link rel="stylesheet" href="/fuman/kindeditor/plugins/code/prettify.css" />
	<script charset="utf-8" src="/fuman/kindeditor/kindeditor.js"></script>
	<script charset="utf-8" src="/fuman/kindeditor/lang/zh_CN.js"></script>
	<script charset="utf-8" src="/fuman/kindeditor/plugins/code/prettify.js"></script>
	<script>
		KindEditor.ready(function(K) {
			 window.editor = K.create("#standard");
		});
	</script>
	<textarea id="standard" name="standard" style="width:85%;height:300px;visibility:hidden;">{{$goods.standard}}</textarea>
                </td>
               
              </tr>
                <tr>
                <td class="head1">面料信息</td>
                <td class="head0" colspan="3">
                <textarea name="fabricinfo" cols="10" rows="6">{{$goods.fabricinfo}}</textarea>
                </td>
              </tr>
               <tr>
                <td class="head1">备注信息</td>
                <td class="head0" colspan="3">
                <textarea name="memo" cols="10" rows="6">{{$goods.memo}}</textarea>
                </td>
              </tr>
              
             </tbody>
           </table>
        
        <br>
        {{if $goods.g_supplier==3}}
        	{{if $classid ==8 || $classid ==1 || $classid ==7 || $classid ==14 || $userid=='302'}}
            
         <table cellpadding="0" cellspacing="0" border="0" class="stdtable" {{if $goods.g_supplier !=3}} style="display:none"{{/if}} id="showsupplier">
            <thead>
              <tr>
                <th colspan="6" class="head1">外采购供应商 &nbsp;&nbsp;<span style="margin-top:10px"><a href="javascript:void(0)"  onClick="showinputPro()"><img src="/fuman/images/add.png"></a></span></th>
              </tr>
            </thead>
            {{if $businessman}}
            
                  {{foreach from=$businessman item=res key=key}}
                  
                    <tr>       
                   <td class="head1" width="10%">采购商家名称</td>
                    <td class="head0" width="40%"><input id="businessman" name="businessman[]" class="width200" type="text"  value="{{$res.businessman}}"></td>
                    <td class="head0" width="10%">采购连接</td>
                    <td class="head1" colspan="2"><input id="businessmanline" name="businessmanline[]" class="width400" value="{{$res.businessmanline}}" type="text" ></td>
                     <td><a href="javascript:void(0);" onClick="delSupplier({{$res.id}})"><img src="/fuman/images/no.gif" title="点击删除"></a></td>
                  </tr>
                 
                  
                    {{/foreach}}
            {{else}}
             <tr>       
               <td class="head1">采购商家名称</td>
                <td class="head0"><input id="businessman" name="businessman[]" class="width200" type="text" ></td>
                <td class="head0">采购连接</td>
                <td class="head1" colspan="2"><input id="businessmanline" name="businessmanline[]" class="width400" value="" type="text" ></td>
              </tr>
              {{/if}}
            <tbody id="showsuppliertd">
            </tbody>
          </table>
           {{/if}}
        {{/if}}
         <br>
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
              <tr>
                <th class="head1">库存信息 </th>
                
              </tr>
            </thead>
          </table>
           <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
              <tr>
                <th class="head1">仓库 </th>
                <th class="head1">在库数 </th>
                <th class="head1">在途数</th>
                <th class="head1">仓位</th>
              </tr>
            </thead>
              <tbody>
            
			{{foreach from=$storage item=res name=loop key=key}}
                <tr>
                <td class="head1" style="position:relative;">{{$res.storage_name}}</td>
                <td class="head1" style="position:relative;">{{$res.stock}}</td>
                <td class="head1" style="position:relative;">{{$res.in_transit}}</td>
                <td class="head1" style="position:relative;" width="20%">
                
                {{if $classid==10 || $userid==239 || $userid==294}}
                {{if $res.positions==''}}
               	 <span onClick="listTable.edit(this, 'changpositions','{{$res.id}}','{{$res.positions}}')">点击修改</span>
                {{else}}
              	  <span onClick="listTable.edit(this, 'changpositions','{{$res.id}}','{{$res.positions}}')">{{$res.positions}}</span>
                	
                {{/if}}
                {{else}}
                	{{$res.positions}}
                {{/if}}
                </td>
               </tr>
              {{/foreach}}
             
             </tbody>
          </table>
        	
        <br>
         {{if $classid ==12 || $classid ==13}}
        
        	{{else}}
         		{{if $orderhistoryList}}
	
<table cellpadding="0" cellspacing="0" border="0" class="stdtable">
<thead>
 <tr>
    <th colspan="8" class="head1">历史订单</th>
    <th  class="head1" align="right"><a href="/order/ajaxbutton?op=showhistoryOrder&goods_id={{$goods.goods_id}}" target="_blank">More</a>
    {{if $goods.fbasale1 || $goods.fbasale2 || $goods.fbasale3}}
    | <a href="/order/amazonfba?goods_id={{$goods.goods_id}}" target="_blank">FBA历史订单</a>
    {{/if}}
    </th>
  </tr>
</thead>
<tbody >
<thead>
  <tr class="lbbt">
     <td bgcolor="#FEFFF1" >订单编号</td>
    <td  bgcolor="#FEFFF1" >店铺</td>
    <td  bgcolor="#FEFFF1" >状态</td>
    <td  bgcolor="#FEFFF1">买家帐号</td>
    <td  bgcolor="#FEFFF1" >订单金额</td>
    <td  bgcolor="#FEFFF1">货运方式</td>
    <td bgcolor="#FEFFF1">货运单号</td>
 <td  bgcolor="#FEFFF1">订单时间</td>
 <td  bgcolor="#FEFFF1">发货时间</td>
  </tr>
</thead>
{{foreach from=$orderhistoryList item=li key=key}}
<tr>
  <td valign="middle"  style="position:relative;"><a href="/orderlist/editorder?order_id={{$li.order_id}}" target="_blank">{{$li.order_sn}}</a></td>
  <td>{{$li.shopname}}</td>
  <td valign="middle" >{{if $li.order_status==1}}新订单{{/if}}
  {{if $li.order_status==2}}已支付{{/if}}
  {{if $li.order_status==3}}配货中{{/if}}
  {{if $li.order_status==4}}已发货{{/if}}
  {{if $li.order_status==5}}已完成{{/if}}
  {{if $li.order_status==6}}已作废{{/if}}</td>
  <td valign="middle" >{{$li.customerid}}</td>
  <td valign="middle" >{{$li.goods_amount}}</td>
  <td valign="middle" >{{$li.shipping_name}}</td>
   <td valign="middle" >{{$li.shipping_number}}</td>
  <td valign="middle" >{{$li.ordertime}}</td>
  <td valign="middle" >{{$li.expresstime}}</td>
</tr>
{{/foreach}}
</tbody>
</table>
<br>
{{/if}} 


{{if $orderhistoryList=="" && $getorderhistoryFBAList}}
	
<table cellpadding="0" cellspacing="0" border="0" class="stdtable">
<thead>
 <tr>
    <th colspan="8" class="head1">FBA历史订单</th>
    <th  class="head1" align="right">
   <a href="/order/amazonfba?goods_id={{$goods.goods_id}}" target="_blank">FBA历史订单</a>
   
    </th>
  </tr>
</thead>
<tbody >
<thead>
  <tr class="lbbt">
     <td bgcolor="#FEFFF1" >订单编号</td>
    <td  bgcolor="#FEFFF1" >店铺</td>
    <td  bgcolor="#FEFFF1" >状态</td>
    <td  bgcolor="#FEFFF1">买家帐号</td>
    <td  bgcolor="#FEFFF1" >订单金额</td>
    <td  bgcolor="#FEFFF1">货运方式</td>
    <td bgcolor="#FEFFF1">货运单号</td>
 <td  bgcolor="#FEFFF1">订单时间</td>
 <td  bgcolor="#FEFFF1">发货时间</td>
  </tr>
</thead>
{{foreach from=$getorderhistoryFBAList item=li key=key}}
<tr>
  <td valign="middle"  style="position:relative;"><a href="/order/editFBAorder?order_id={{$li.id}}" target="_blank">{{$li.tradeid}}</a></td>
  <td>{{$li.shopname}}</td>
  <td valign="middle" >已完成</td>
  <td valign="middle" >{{$li.custid}}</td>
  <td valign="middle" >{{$li.goods_amount}}</td>
  <td valign="middle" >FBA</td>
   <td valign="middle" >AFN</td>
  <td valign="middle" >{{$li.ordercreatetime}}</td>
  <td valign="middle" >{{$li.expresstime}}</td>
</tr>
{{/foreach}}
</tbody>
</table>
<br>
{{/if}} 

 	{{/if}}
          {{if $goods_log}}
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
              <tr>
                <th class="head1">商品日志 </th>
                 <th class="head1" align="right">
                 <div align="right" style="padding-right:50px;"><a href="/order/ajaxbutton?op=showhistorylog&goods_id={{$goods.goods_id}}" target="_blank">More</a></div></th>
              </tr>
            </thead>
          </table>
           <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
           <tr>
              <td>时间</td>
              <td>内容</td>
              <td>执行者</td>
            </tr>
             <tbody style="height:100px; overflow:auto">
			{{foreach from=$goods_log item=res name=loop key=key}}
            	 <tr>
              <td width="10%">{{$res.updatetime}}</td>
              <td width="80%">{{$res.content}}</td>
              <td width="5%">{{$res.createUser}}</td>
                </tr>
              {{/foreach}}
             </tbody>
             
          </table>
          	{{/if}}
           <br>
         
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
              <tr>
                <td> <button type="submit"  type="submit"  onclick="doAddorder();return false;" class="btn btn-primary" > 保存商品 </button>
                
				  

                </td>
              </tr>
             
            </thead>
           
          </table>
        </form>
        <br />
      </div>
      <!--subcontent--> 
      
      <!--subcontent--> 
      
    </div>
    <!--contentwrapper--> 
    
  </div>
  <!-- centercontent --> 
  
</div>


<!-- 模态框（Modal）添加商品图片 -->
<form action="/product/ajaxbutton?op=upimages" enctype="multipart/form-data"  method="post" name="otherform" id="otherform" >
<input type="hidden" name="goods_id" id="goods_id">
  <div class="modal fade" id="addattributeform" tabindex="-1" role="dialog" aria-labelledby="returnaddattributeform" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="returnaddattributeform"> 上传图片(图片格式只允许 JPG GIF和PNG) </h4>
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>上传： </td>
              <td align="left"><input type="file" name="userfile[1]" id="userfile1" /> <a href="javascript:void(0)"  onClick="showinput('fileinput')" class="btn btn_book"><span>添加一张图片</span></a></td>
            </tr>
            <tbody id="fileinput"></tbody>
          
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="AWSsubmit('otherform','addattributeform')"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
</form>
<!-- 模态框（Modal）添加商品图片 -->
<script language="javascript">
function doAddorder()
{
	
	
	var contenthtml = editor.html();
	//editor1.sync();


	editor.sync();
	 document.forms['otherForm'].submit(); 
}
    function delSupplier(id) {
        if(confirm("确定删除？")){
            $.post("/product/ajaxbutton", {"op": "delSupplier","id":id},
                    function(data){
                        if(data==200)
                        {
                            alert("删除成功");
                            location.reload();
                        }

                        return;
                    },"json");


        }
        
    }

</script>

</body>
</html>